package com.dq.Week2.day09.homework2;

import java.util.Scanner;

public class Demo {
    public static void main(String[] args) {
        BookInterFace bookInterFace = null;
        System.out.println("欢迎来到图书管理系统");
        while(true)
        {
            Scanner scanner = new Scanner(System.in);
            System.out.println("请选择你的操作：1.添加书籍\t 2.修改书籍\t 3.删除书籍\t 4.查询书籍\t 5.查询所有书籍");
            String index = scanner.next();
            switch (index)
            {
                case "1":
                    System.out.println("请输入书籍名称：");
                    String name = scanner.next();
                    System.out.println("请输入书籍作者");
                    String authorName = scanner.next();
                    System.out.println("请输入书籍地址");
                    String address = scanner.next();
                    Book book = new Book(name,address,authorName);
                    if(bookInterFace.addBook(book))
                    {
                        System.out.println("添加成功");
                    }else{
                        System.out.println("添加失败");
                    }

                    break;
                case "2":
                    System.out.println("请输入你要修改书籍的Id号：");
                    int id = scanner.nextInt();


                    break;
                case "3":

                    break;
                case "4":
                    break;
                case "5":
                    break;
                default:
                    System.out.println("您输入有误请重新输入！！！");

            }
        }
    }
}
